<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasOne;

class AccountMapping extends Model
{
    protected $table = "account_mapping";
    public $timestamps = false;
    public $guarded = [];

    public function account(): BelongsTo
    {
        return $this->belongsTo(Account::class,"account_id","id");
    }

    public function mall(): HasOne
    {
        return $this->hasOne(Mall::class,"merchant_no","merchant_no");
    }

}
